package org.example.javadt.entity;

import java.sql.Date;

public class posts {
    private String post_id;
    private String user_id;
    private String content;
    private String platform;
    private Date timestamp;
    private int like_count;
    private int comment_count;
    private int share_count;
//    存储数据：
//
//    post_id：帖子唯一标识
//    user_id：发帖用户 ID（关联 users 表）
//    content：帖子内容
//    platform：帖子发布平台
//    timestamp：发帖时间
//    like_count：点赞数
//    comment_count：评论数
//    share_count：分享数
//
//    用途：
//    存储所有用户发布的帖子信息，是系统的核心数据表。


    public String getPost_id() {
        return post_id;
    }

    public void setPost_id(String post_id) {
        this.post_id = post_id;
    }

    public String getUser_id() {
        return user_id;
    }

    public void setUser_id(String user_id) {
        this.user_id = user_id;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getPlatform() {
        return platform;
    }

    public void setPlatform(String platform) {
        this.platform = platform;
    }

    public Date getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(Date timestamp) {
        this.timestamp = timestamp;
    }

    public int getLike_count() {
        return like_count;
    }

    public void setLike_count(int like_count) {
        this.like_count = like_count;
    }

    public int getComment_count() {
        return comment_count;
    }

    public void setComment_count(int comment_count) {
        this.comment_count = comment_count;
    }

    public int getShare_count() {
        return share_count;
    }

    public void setShare_count(int share_count) {
        this.share_count = share_count;
    }

    public posts() {
    }

    public posts(String post_id, String user_id, String content, String platform, Date timestamp, int like_count, int comment_count, int share_count) {
        this.post_id = post_id;
        this.user_id = user_id;
        this.content = content;
        this.platform = platform;
        this.timestamp = timestamp;
        this.like_count = like_count;
        this.comment_count = comment_count;
        this.share_count = share_count;
    }

    @Override
    public String toString() {
        return "posts{" +
                "post_id='" + post_id + '\'' +
                ", user_id='" + user_id + '\'' +
                ", content='" + content + '\'' +
                ", platform='" + platform + '\'' +
                ", timestamp=" + timestamp +
                ", like_count=" + like_count +
                ", comment_count=" + comment_count +
                ", share_count=" + share_count +
                '}';
    }
}
